Range

Function

This API is used to get parameter range for Storage > Schedules(cloud dedicated) > Schedule template(cloud dedicated) page.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/Schedules/Template/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
tamplate_listarrayPlanner template, see Table 2 for detailed information

Table 2

Channel Info object

ParameterRangeTypeDescription
tamplate_namestringSchedule template name
schedule_listarraySchedule data, see Table 3 for detailed information

Table 3

ParameterRangeTypeDescription
enableboolWhether the schedule is enabled
start_time0~1439intstart time
end_time0~1440intend time
weekday"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
stringnumber of days

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {"tamplate_list": {
        "type": "array",
        "min_size": 1,
        "max_size": 16,
        "items": [{
            "tamplate_name": {
                "type": "string",
                "min_len": 1,
                "max_len": 35
            },
            "schedule_list": {
                "type": "array",
                "min_size": 0,
                "max_size": 8,
                "items": [{
                    "enable": {"type": "bool"},
                    "start_time": {
                        "type": "int32",
                        "min": 0,
                        "max": 1439
                    },
                    "end_time": {
                        "type": "int32",
                        "min": 0,
                        "max": 1440
                    },
                    "weekday": {
                        "type": "array",
                        "min_size": 1,
                        "max_size": 7,
                        "items": [{
                            "type": "string",
                            "items": [
                                "Sunday",
                                "Monday",
                                "Tuesday",
                                "Wednesday",
                                "Thursday",
                                "Friday",
                                "Saturday"
                            ]
                        }]
                    }
                }]
            }
        }]
    }}
}

Error Code

See Response Messages Body and Common error_code for more information.